﻿using System;

namespace Mono.Cecil.Cil
{
	// Token: 0x0200013D RID: 317
	public sealed class VariableDebugInformation : DebugInformation
	{
		// Token: 0x17000313 RID: 787
		// (get) Token: 0x06000BD6 RID: 3030 RVA: 0x00034FEC File Offset: 0x000331EC
		public int Index
		{
			get
			{
				return this.index.Index;
			}
		}

		// Token: 0x17000314 RID: 788
		// (get) Token: 0x06000BD7 RID: 3031 RVA: 0x0003500C File Offset: 0x0003320C
		// (set) Token: 0x06000BD8 RID: 3032 RVA: 0x0000635E File Offset: 0x0000455E
		public string Name
		{
			get
			{
				return this.name;
			}
			set
			{
				this.name = value;
			}
		}

		// Token: 0x17000315 RID: 789
		// (get) Token: 0x06000BD9 RID: 3033 RVA: 0x00035024 File Offset: 0x00033224
		// (set) Token: 0x06000BDA RID: 3034 RVA: 0x00006368 File Offset: 0x00004568
		public VariableAttributes Attributes
		{
			get
			{
				return (VariableAttributes)this.attributes;
			}
			set
			{
				this.attributes = (ushort)value;
			}
		}

		// Token: 0x17000316 RID: 790
		// (get) Token: 0x06000BDB RID: 3035 RVA: 0x0003503C File Offset: 0x0003323C
		// (set) Token: 0x06000BDC RID: 3036 RVA: 0x00006372 File Offset: 0x00004572
		public bool IsDebuggerHidden
		{
			get
			{
				return this.attributes.GetAttributes(1);
			}
			set
			{
				this.attributes = this.attributes.SetAttributes(1, value);
			}
		}

		// Token: 0x06000BDD RID: 3037 RVA: 0x0003505C File Offset: 0x0003325C
		internal VariableDebugInformation(int index, string name)
		{
			bool flag = name == null;
			if (flag)
			{
				throw new ArgumentNullException("name");
			}
			this.index = new VariableIndex(index);
			this.name = name;
		}

		// Token: 0x06000BDE RID: 3038 RVA: 0x00035098 File Offset: 0x00033298
		public VariableDebugInformation(VariableDefinition variable, string name)
		{
			bool flag = variable == null;
			if (flag)
			{
				throw new ArgumentNullException("variable");
			}
			bool flag2 = name == null;
			if (flag2)
			{
				throw new ArgumentNullException("name");
			}
			this.index = new VariableIndex(variable);
			this.name = name;
			this.token = new MetadataToken(TokenType.LocalVariable);
		}

		// Token: 0x0400074A RID: 1866
		private string name;

		// Token: 0x0400074B RID: 1867
		private ushort attributes;

		// Token: 0x0400074C RID: 1868
		internal VariableIndex index;
	}
}
